package com.woniu.hospital.service.impl;

import com.woniu.hospital.domain.EquipmentType;
import com.woniu.hospital.mapper.EquipmentTypeMapper;
import com.woniu.hospital.service.IEquipmentTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 设备类型表Service业务层处理
 *
 * @author wolf-six
 * @date 2023-02-15
 */
@Service
public class EquipmentTypeServiceImpl implements IEquipmentTypeService
{
    @Autowired
    private EquipmentTypeMapper equipmentTypeMapper;

    /**
     * 查询设备类型表
     *
     * @param equipmentTypeid 设备类型表主键
     * @return 设备类型表
     */
    @Override
    public EquipmentType selectEquipmentTypeByEquipmentTypeid(Long equipmentTypeid)
    {
        return equipmentTypeMapper.selectEquipmentTypeByEquipmentTypeid(equipmentTypeid);
    }

    /**
     * 查询设备类型表列表
     *
     * @param equipmentType 设备类型表
     * @return 设备类型表
     */
    @Override
    public List<EquipmentType> selectEquipmentTypeList(EquipmentType equipmentType)
    {
        return equipmentTypeMapper.selectEquipmentTypeList(equipmentType);
    }

    /**
     * 新增设备类型表
     *
     * @param equipmentType 设备类型表
     * @return 结果
     */
    @Override
    public int insertEquipmentType(EquipmentType equipmentType)
    {
        return equipmentTypeMapper.insertEquipmentType(equipmentType);
    }

    /**
     * 修改设备类型表
     *
     * @param equipmentType 设备类型表
     * @return 结果
     */
    @Override
    public int updateEquipmentType(EquipmentType equipmentType)
    {
        return equipmentTypeMapper.updateEquipmentType(equipmentType);
    }

    /**
     * 批量删除设备类型表
     *
     * @param equipmentTypeids 需要删除的设备类型表主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentTypeByEquipmentTypeids(Long[] equipmentTypeids)
    {
        return equipmentTypeMapper.deleteEquipmentTypeByEquipmentTypeids(equipmentTypeids);
    }

    /**
     * 删除设备类型表信息
     *
     * @param equipmentTypeid 设备类型表主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentTypeByEquipmentTypeid(Long equipmentTypeid)
    {
        return equipmentTypeMapper.deleteEquipmentTypeByEquipmentTypeid(equipmentTypeid);
    }

    @Override
    public EquipmentType selectEquipmentTypeByEquipmentTypeName(String equipmentTypeName) {
        return equipmentTypeMapper.selectEquipmentTypeByEquipmentTypeName(equipmentTypeName);
    }
}
